/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Client;

import RemoteObjects.ObjectInterface;
import java.rmi.ConnectException;
import java.rmi.Naming;
/**
 *
 * @author pbal
 */
public class ClientRMI {

    public static void main(String[] args) throws Exception {
    
        try {
        String urlServer = "//localhost:9020/RMIServer";
        ObjectInterface remoteObject = (ObjectInterface) Naming.lookup(urlServer);
        
        System.out.println(remoteObject.testMethod("Test String !!!"));
    
        } catch(ConnectException ex) {System.out.println("Server not RUNNING!");}
    }
}
